aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-27 19:28:59 -0800
committerAdam Soltys <[email protected]>2023-02-27 19:28:59 -0800
commit301770cb05331c8cbb32f60b11c62a79c9d28df3 (patch)
treeacd4126b1f0d2e893719468135fbf439e916c4bb /src/routes/(app)/[username]
parent34bc1c031378f8333819f2b46fb74f46634fb639 (diff)
downloadcoinos-ui-301770cb05331c8cbb32f60b11c62a79c9d28df3.tar.gz
coinos-ui-301770cb05331c8cbb32f60b11c62a79c9d28df3.zip
prettier
Diffstat (limited to 'src/routes/(app)/[username]')
-rw-r--r--src/routes/(app)/[username]/invoice/[hash]/+page.svelte36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte
index 2ff92687..fff2b22c 100644
--- a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte
+++ b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte
@@ -7,7 +7,6 @@
import { last } from '$lib/store';
import { Avatar, Icon, Heart, Image } from '$comp';
import { t } from '$lib/translations';
- import screenfull from 'screenfull';
import { goto, invalidate } from '$app/navigation';
export let data;
@@ -67,14 +66,6 @@
$: link = type === 'bitcoin' ? text : `lightning:${text}`;
$: txt = type === 'bitcoin' ? hash : text;
- let full;
- let toggle = () => {
- screenfull.toggle(qr);
- full = !full;
- if (full) src = lg;
- else src = sm;
- };
-
let toggleType = async () => {
invoice.type = invoice.type === types.lightning ? types.bitcoin : types.lightning;
({ hash } = await post(`/${username}/invoice`, {
@@ -111,21 +102,18 @@
<div class="my-auto">Bitcoin</div>
</button>
</div>
- <div class="relative flex">
- <div class="flex mx-auto w-[360px] h-[360px]">
- <img
- {src}
- class:p-4={full}
- class="w-[300px] h-[300px] mx-auto z-10 mt-[20px]"
- bind:this={qr}
- on:click={toggle}
- on:keydown={toggle}
- alt={txt}
- />
- </div>
- <div
- class="absolute m-auto left-0 right-0 w-[340px] h-[340px] rounded-full bg-gradient-to-r from-[#F2F6FC] to-[#E1E3FF] z-0"
- />
+
+ <div>
+ <a href={invoice.type === 'bitcoin' ? invoice.text : 'lightning:' + invoice.text}>
+ <div class="relative flex">
+ <div class="flex mx-auto w-[360px] h-[360px]">
+ <img {src} class="w-[300px] h-[300px] mx-auto z-10 mt-[20px]" bind:this={qr} alt={txt} />
+ </div>
+ <div
+ class="absolute m-auto left-0 right-0 w-[340px] h-[340px] rounded-full bg-gradient-to-r from-[#F2F6FC] to-[#E1E3FF] z-0"
+ />
+ </div>
+ </a>
</div>
{#if amount > 0}